//
//  TJJWebViewController.m
//  Light
//
//  Created by WangJiaheng on 16/1/15.
//  Copyright © 2016年 骁唐. All rights reserved.
//

#import "TJJWebViewController.h"

@interface TJJWebViewController ()

@property (nonatomic, weak) IBOutlet UIWebView * webView;
@property (nonatomic, weak) IBOutlet UILabel * labelTitle;

@end

@implementation TJJWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    //设置title
    if (self.titleString.length >= 1)
    {//如果传入的titleString长度大于0
        self.labelTitle.text = self.titleString;
    }
    
    //webView的链接
    NSURL *url = [NSURL URLWithString:self.urlLink];
    NSURLRequest *req = [NSURLRequest requestWithURL:url];
    [self.webView loadRequest:req];
}

#pragma mark -
#pragma mark 导航返回方法实现
- (IBAction)navBack:(UIButton *)button
{//返回按钮的返回方法实现
//    [self.navigationController popViewControllerAnimated:YES];
    [self dismissViewControllerAnimated:YES completion:^{
        ;
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
